import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int n = scanner.nextInt();

            String[][] table = new String[n][];


            for (int i = 1; i <= n; i++) {
                table[i - 1] = new String[i];
                for (int j = 1; j <= i; j++) {

                    table[i - 1][j - 1] = String.format("%d*%d=%d", i, j, i * j);
                    if (j == 1) {
                        System.out.print(table[i - 1][j - 1]);
                    } else {
                        System.out.printf("%7s", table[i - 1][j - 1]);
                    }
                }
                System.out.println();
            }


            System.out.println(Arrays.deepToString(table));
        }
        scanner.close();
    }
}